package com.example.loginplaus;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class Register extends AppCompatActivity {


    private EditText ed_name;
    private EditText ed_age;
    private EditText ed_user;
    private EditText ed_pwd;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        init();
    }

    public void init() {
        ed_name = findViewById(R.id.main_ed_name);
        ed_age = findViewById(R.id.main_ed_age);
        ed_user = findViewById(R.id.main_ed_user);
        ed_pwd = findViewById(R.id.main_ed_pwd);
    }

    public void Register(View view) {
        String name = ed_name.getText().toString();
        String age = ed_age.getText().toString();
        String user = ed_user.getText().toString();
        String pwd = ed_pwd.getText().toString();

        Intent intent = new Intent(this,MainActivity.class);
        intent.putExtra("name",name);
        intent.putExtra("age",age);
        intent.putExtra("user",user);
        intent.putExtra("pwd",pwd);
        startActivity(intent);
    }

    public void End(View view) {
        finish();
    }
}